#ifndef QTOOLGRAPHICSSCENE_H
#define QTOOLGRAPHICSSCENE_H

#include <QGraphicsScene>
#include <QMap>
#include <QString>
class QMyTool;

class QToolGraphicsScene : public QGraphicsScene
{
    Q_OBJECT
public:
    explicit QToolGraphicsScene(QObject *parent = 0);
    QToolGraphicsScene(const QRectF & sceneRect,QObject *parent=0);
    QToolGraphicsScene(qreal x,qreal y,qreal width,qreal height,QObject * parent =0);
    ~QToolGraphicsScene();
    bool AddTool(QString name,QMyTool * tool_pt);
    bool SetCurrentTool(QString name);
protected:
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent);
    virtual void mouseMoveEvent (QGraphicsSceneMouseEvent * mouseEvent );
    virtual void mousePressEvent (QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent );
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent );
private:
    QMyTool *currentTool;
    QMap<QString,QMyTool* > ToolDict;
    
signals:
    
public slots:
    
};

#endif // QTOOLGRAPHICSSCENE_H
